<?php

      require_once ("../../system/framework.php");  
      
      
      // table calc
      $table = "[php_property:table]";
      $field = "[php_property:field]";
      
      
      $data = new data();
      $form = new form();
      $db = new db();
      
      
      $data->getTable($table);
      
     $commandField = array();
     
      // command fields auslesen
      for ($n=0;$n<sizeof($data->field); $n++) {
          
          if (strpos($data->field[$n], $field."_") === 0)
            $commandField[] = $data->field[$n];
          
          
      }
      
      
     
      //print_r($commandField);
      
     
      do {
          
          
          echo $data->data[$field]."<br>";
          
          
          
          $dataValue = $form->getCommandFieldValue($field, $data->data[$field], $commandField, $table);
          $dataValue['id2'] = $data->data['id2'];
          
          $db->saveData($table, $dataValue);
                  
          
      } while($data->nextRow());
      
      
      echo "fertig";
      


  
?>
